@import com.mgfireworks.mgplatform.mgadmin.product.model.Product
@extends("/form_template")
@args Boolean isEdit
@args Product product
@{
	if(product==null){
		product=new Product();
	}
}
       <div class="x_title">
         <h2>@if(isEdit){修改}else{添加}产品</h2>
         <div class="clearfix"></div>
       </div>
       <div class="x_content">
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="productId">产品编号<span class="required">*</span>
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="productId" name="productId" value="@product.getProductId()" placeholder="请输入产品编号" required="required" @if(isEdit&&true){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="productName">产品名<span class="required">*</span>
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="productName" name="productName" value="@product.getProductName()" placeholder="请输入产品名" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="cateId">类别<span class="required">*</span>
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="cateId" name="cateId" value="@product.getCateId()" placeholder="请输入类别" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="categoryName">类别名
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="categoryName" name="categoryName" value="@product.getCategoryName()" placeholder="请输入类别名"  @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="bandId">品牌<span class="required">*</span>
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="bandId" name="bandId" value="@product.getBandId()" placeholder="请输入品牌" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="bandName">品牌名
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="bandName" name="bandName" value="@product.getBandName()" placeholder="请输入品牌名"  @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="mainImg">主图片
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	         	<img class="product-main-img" src="@url("/)@product.getMainImg()"/>
	         	<div class="x_panel">
                  <div class="x_title collapse-link">
                    <button type="button" class="btn btn-primary btn-sm">上传图片</button>
                    <ul class="nav navbar-right panel_toolbox">
                      <li><a class="collapse-link"><i class="fa fa-chevron-up"></i></a></li>
                    </ul>
                    <div class="clearfix"></div>
                  </div>
                  <div class="x_content" style="display: none;">
		         	<input type="text" id="mainImg" name="mainImg" value="@product.getMainImg()" readonly="readonly" class="form-control col-md-7 col-xs-12">
		         	<div class="dropzone dz-clickable dz-started uploader-img"></div>
                  </div>
                </div>
	         	
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="sellLevel">销售级别<span class="required">*</span>
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="sellLevel" name="sellLevel" value="@product.getSellLevel()" placeholder="请输入销售级别" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="sellLevelName">销售级别名
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="sellLevelName" name="sellLevelName" value="@product.getSellLevelName()" placeholder="请输入销售级别名"  @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
	       <div class="form-group">
	         <label class="control-label col-md-3 col-sm-3 col-xs-12" for="recommend">是否推荐<span class="required">*</span>
	         </label>
	         <div class="col-md-6 col-sm-6 col-xs-12">
	           <input type="text" id="recommend" name="recommend" value="@product.getRecommend()" placeholder="请输入是否推荐" required="required" @if(isEdit&&false){readonly="readonly"} class="form-control col-md-7 col-xs-12">
	         </div>
	       </div>
			
			<ul id="js-form-error-list" class="form-error-list row alert alert-danger alert-dismissible fade in">
				@errors("<li class=\"col-sm-4 label\">{0}</li>")
			</ul>
       </div>